<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.7.1/jquery.js"></script>
    <title>Document</title>
</head>

<body>
    <form action="">
        <script>
        $.ajax({
            url: 'http://sign.njpi/user.php',
            method: 'get',
            data: {
                "action": "query"
            },
            success: (res) => {
                var users = JSON.parse(res).data;
                for (let user of users) {
                    var newOption = $('<option>', {
                        value: user.id,
                        text: user.username
                    });
                    $('#userid').append(newOption);
                }
            }
        })
        </script>
    </form>
</body>

</html>